<?php

class GDGViewModel extends ViewModel{
	
	public $table='good';
	
	 public $view=array(
	  	'good' =>
	  	 array(
	    '_type' => 'INNER',
	  	 ),
	  	'gdata' =>
	  	 array(
	  	  '_type' => 'INNER',
	  	  '_on' => 'good.gid=gdata.gid',
   	),
   );
   
   public function get_all_data($where=null){
		return $this->where($where)->all();
   }
   
   public function get_gid($where=null){
   		return $this->where($where)->getField('gid',true);
	
   }
	
}